<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Views/Shared/page.master" %>
<asp:Content id="mainHolder" ContentPlaceHolderID="MainContent" runat="server">
	<h1>Cuentas</h1>
	<table>
		<tr>
			<th>Nombre</th>
			<th>Ingresos</th>
			<th>Gastos</th>
			<th>Balance</th>
		</tr>
		<%
			List<DomesticBank.Models.Account> accounts = (List<DomesticBank.Models.Account>)ViewData["accounts"];
			for(int i = 0; i < accounts.Count; i++) {
		%>
		<tr>
			<td><a href="/Accounts/Account/<%=accounts[i].Id%>"><%=accounts[i].Name%></a></td>
			<td><%=accounts[i].Income%></td>
			<td><%=accounts[i].Expenses%></td>
			<td><%=accounts[i].Balance%></td>
		</tr>
		<%
			}
		%>
	</table>
	<a href="/Accounts/Add">Nueva cuenta</a>
</asp:Content>